gtkapplication: g_dbus_proxy_new_sync can return NULL
authorTimm Bäder <mail@baedert.org>
Sun, 9 Jul 2017 08:02:34 +0000 (10:02 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:15 +0000 (21:27 -0400)
Specifically, in the case where @error is set.

gtk/gtkapplication-dbus.c

index 3ad964ee575997420e107054f6d0f7e3ba7b52c6..be88565216bcce0324e0fa4d1317955f6a972ded 100644 (file)
@@ -131,6 +131,9 @@ gtk_application_get_proxy_if_service_present (GDBusConnection *connection,
                                  NULL,
                                  error);
 
+  if (!proxy)
+    return NULL;
+
   /* is there anyone actually providing the service? */
   owner = g_dbus_proxy_get_name_owner (proxy);
   if (owner == NULL)